export const browserType = () => {
    const userAgent = navigator.userAgent;
    const isOpera = userAgent.indexOf('Opera') > -1;
    const isIE = userAgent.indexOf('compatible') > -1 && userAgent.indexOf('MSIE') > -1 && !isOpera;
    const isEdge = userAgent.indexOf('Windows NT 6.1; Trident/7.0;') > -1 && !isIE;
    const isFF = userAgent.indexOf('Firefox') > -1;
    const isSafari = userAgent.indexOf('Safari') > -1 && userAgent.indexOf('Chrome') === -1;
    const isChrome = userAgent.indexOf('Chrome') > -1 && userAgent.indexOf('Safari');

    if (isFF) {
        return 'FF';
    }
    if (isOpera) {
        return 'Opera';
    }
    if (isSafari) {
        return 'Safari';
    }
    if (isChrome) {
        return 'Chrome';
    }
    if (isEdge) {
        return 'Edge';
    }
};
